﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using APH.Parl2.Shared.Contracts;
using APH.ThirdParty.ServiceModelEx;

namespace APH.Parl2.Services.PubSub
{
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
    public class PublishEventService : PublishService<IPublishEvents>, IPublishEvents
    {
        [OperationBehavior(TransactionScopeRequired=true)]
        public void OnPublished(Guid documentId)
        {
            Console.WriteLine("OnPublished: {0}", documentId);
            FireEvent(documentId);
        }
    }
}
